<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--    <script>
        (function(window) {
            var doc = window.document;
            // -&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;代码段二 &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
            var JQuery = function(selector) {
                return new JClass(selector);
            }

            // -&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; 代码段三 &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
            JQuery.html = function(obj) {
                if(obj && obj.nodeType === 1) {
                    return obj.innerHTML;
                }
            }

            // -&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;代码段一 &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
            var JClass = function(selector) {
                if (selector.nodeType ) { // 如果传入的是DOM元素
                    this.length = 1;
                }else if(selector.charAt(0) === '#') { //如果传入的是'#..'形式
                    this.length = 1;
                    this[0] = doc.getElementById(selector.slice(1));
                }else if(typeof selector === 'string') {
                    //传入的是字符串，假设全部为html标签 ，如'div' 'p'等
                    var nodes = doc.getElementsByTagName(selector);
                    this.length = nodes.length;
                    for(var i=0,len=nodes.length;i<len;i++) {
                        this[i] = nodes[i];
                    }
                }else { //都不是的话，就不识别咯
                    this.length = 0;
                }
            };

            // &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; 代码段四 &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
            JQuery.prototype.html = function() {
                if(this[0]) {
                    return JQuery.html(this[0]);
                }
            }
            JClass.prototype = JQuery.prototype;

            // &#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45; 代码段五 -&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;&#45;
            window.xcy = window.JQuery = JQuery;

        }(window));
    </script>-->
    <script src="../lib/jquery/jquery-3.3.1.js"></script>
</head>
<body>
<div style="margin:10px 10px;">
        <span id='result'>
        点击看效果
      </span>
</div>
<div id='tst'>div文本值</div>

<script>
/*    alert($.html(document.getElementById('result'))); //点击看效果
    alert($('span').html()); //点击看效果
    alert($('#tst').html()); //div文本值*/
     alert($('span').html()); //点击看效果
    alert($('#tst').html()); //div文本值
</script>
</body>
</html>